home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 21.zip / BS1 part 21 / Professional Page v4.0 (1993)(Gold Disk)(Disk 1 of 4)[HD].7z / Professional Page v4.0 (1993)(Gold Disk)(Disk 1 of 4)[HD].adf / rexx.lzh / getdirlist.rexx < prev    next >
OS/2 REXX Batch file  |  1992-03-13  |  658b  |  38 lines

  1. /*
  2.    Copyright Gold Disk Inc., January 13, 1992
  3. */
  4. arg sourcedir, filter
  5. cr = '0a'x
  6.  
  7. if ~show(l, "rexxsupport.library") then
  8.    if ~addlib("rexxsupport.library", 0, -30) then
  9.       exit_msg("Please install the rexxsupport.library in your libs: directory before running this genie.")
  10.  
  11. files = showdir(sourcedir, f, '0a'x)
  12.  
  13. list  = ''
  14.  
  15. do while files ~= ''
  16.  
  17.    parse var files name '0a'x files
  18.  
  19.    p = pos(filter, upper(name))
  20.  
  21.    if p ~= 0 then
  22.       list = list || cr || left(name, p - 1)
  23.  
  24. end
  25.  
  26. list = delstr(list, 1, 1)
  27. return(list)
  28. exit_msg()
  29.  
  30. exit_msg: procedure
  31. do
  32.    arg message
  33.  
  34.    if message ~= '' then call ppm_Inform(1,message,)
  35.    return("")
  36. end
  37.  
  38.